
<%@ page language="java" contentType="text/html;charset=UTF-8"%>



<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<title>修改密码-有点</title>
	<link rel="stylesheet" type="text/css"
		href="/back/index_data/XGMM/css.css">
		<script type="text/javascript" src="/back/index_data/XGMM/jquery.js"></script>
</head>
<body>
	<div id="pageAll">
		<div class="pageTop">
			<div class="page">
				<img src="/back/index_data/XGMM/coin02.png"><span><a
						href="/back/index_data/balance.jsp ">首页</a>&nbsp;-&nbsp;<a
						href="/back/index_data/XGMM.jsp ">公共管理</a>&nbsp;-</span>&nbsp;修改密码 
			</div>
		</div>
		<div class="page ">
			<!-- 修改密码页面样式 -->
			<form action="/admin_change" method="post" >
				<div class="bacen">
					<div class="bbD">
						<input type="text" name="accounts.id" value="1" style="display:none;">
							<input type="text" name="accounts.username" value="admin" style="display:none;">
								<input type="password" name="ok" id="oldpwd"
								value="<%=session.getAttribute("password")%>"
								style="display:none;">
									&nbsp;&nbsp;&nbsp;&nbsp;管理员UID：&nbsp;&nbsp;&nbsp;&nbsp;1 
					</div>
					<div class="bbD">
						管理员用户名：&nbsp;&nbsp;&nbsp;&nbsp;<%=session.getAttribute("username")%></div>
					<div class="bbD">
						&nbsp;&nbsp;&nbsp;&nbsp;输入旧密码：<input class="input3"
							onblur="checkpwd1()" id="pwd1" type="password"> 
							</input>
							</br>
							<div style="text-align: center;">
							<img
							class="imga" src="/back/index_data/XGMM/ok.png"><img
								class="imgb" src="/back/index_data/XGMM/no.png">
								<span class="ta" style="display: none">旧密码输入错误！</span>
							</div>
					</div>
					<div class="bbD">
						&nbsp;&nbsp;&nbsp;&nbsp;输入新密码：<input class="input3"
							onblur="checkpwd2()" id="pwd2" type="password"> 
							</br>
							<div style="text-align: center;">
							<img
							class="imga" src="/back/index_data/XGMM/ok.png"><img
								class="imgb" src="/back/index_data/XGMM/no.png">
									<span class="ta" style="display: none">新密码需为6-12位！</span>
									</div>
					</div>
					<div class="bbD">
						再次确认密码：<input class="input3" onblur="checkpwd3()" id="pwd3"
							type="password" name="accounts.password"> 
							</br>
							<div style="text-align: center;">
							<img
							class="imgb" src="/back/index_data/XGMM/no.png">
							<span class="ta" style="display: none">两次输入密码不同！</span>
							</div>
					</div>
					<div class="bbD">
						<p class="bbDP">
							<input type="submit" value="确认修改" class="btn_ok btn_yes" onclick="javascript:alert('修改成功，请注销后重新登录！')"/> <input
								type="reset" value="取消" class="btn_ok btn_no" />
						</p>
					</div>
				</div>
			</form>
			<!-- 修改密码页面样式end -->
		</div>
	</div>

	<script type="text/javascript">
		function checkpwd1() {
			var oldpwd = document.getElementById('oldpwd').value.trim();
			var user = document.getElementById('pwd1').value.trim();
			if (user.length >= 6 && user.length <= 12 && user == oldpwd) {
				$("#pwd1").parent().find(".imga").show();
				$("#pwd1").parent().find(".imgb").hide();
				$("#pwd1").parent().find(".ta").hide();
			} else {
			//	alert("原密码长度应为6到12位或原始密码错误!")
				$("#pwd1").parent().find(".imgb").show();
				$("#pwd1").parent().find(".imga").hide();
				$("#pwd1").parent().find(".ta").show();
			}
			;
		}
		function checkpwd2() {
			var user = document.getElementById('pwd2').value.trim();
			if (user.length >= 6 && user.length <= 12) {
				$("#pwd2").parent().find(".imga").show();
				$("#pwd2").parent().find(".imgb").hide();
				$("#pwd2").parent().find(".ta").hide();
			} else {
				$("#pwd2").parent().find(".imgb").show();
				$("#pwd2").parent().find(".imga").hide();
				$("#pwd2").parent().find(".ta").show();
			}
			;
		}
		function checkpwd3() {
			var user = document.getElementById('pwd3').value.trim();
			var pwd = document.getElementById('pwd2').value.trim();
			if (user.length >= 6 && user.length <= 12 && user == pwd) {
				$("#pwd3").parent().find(".imga").show();
				$("#pwd3").parent().find(".imgb").hide();
				$("#pwd3").parent().find(".ta").hide();
			} else {
				$("#pwd3").parent().find(".imgb").show();
				$("#pwd3").parent().find(".imga").hide();
				$("#pwd3").parent().find(".ta").show();
			}
			;
		}
	</script>
</body>
</html>